
import request from '@/utils/request'

const api = {}
const PORT1 = 'Api'
// POST请求方式
// api.login = params => request.globalRequest(`catalog`, 'POST', params, 1)
api.login = params => {
	return request.globalRequest(`${PORT1}/MiniProgramLogin/index`, 'POST', params, 1)
}
api.loginByToken = params => request.globalRequest(`${PORT1}/MiniProgramLogin/index`, 'POST', params, 0)

api.getUserInfo = params => request.globalRequest(`${PORT1}/MiniProgram/getUserInfo`, 'POST', params, 0)

// GET请求方式
// api.login = params => request.globalRequest(`${PORT1}/MiniProgramLogin/index${formatGetUri(params)}`, 'GET',{}, 1)

// 学校列表
api.getSchoolList = params => request.globalRequest(`${PORT1}/MiniProgram/getSchoolList`, 'POST', params, 0)
// 首页列车时刻
api.progressRatio = params => request.globalRequest(`${PORT1}/MiniProgram/progressRatio`, 'POST', params)
// 列车时刻表详情
api.progressInfo = params => request.globalRequest(`${PORT1}/MiniProgram/progressInfo`, 'POST', params)
// 预售概览
api.getSizeOder = params => request.globalRequest(`${PORT1}/MiniProgram/getSizeOder`, 'POST', params)
// 零售概览
api.getRetailOrder = params => request.globalRequest(`${PORT1}/MiniProgram/getRetailOrder`, 'POST', params)
// 预售详细列表
api.getSizeOderDetail = params => request.globalRequest(`${PORT1}/MiniProgram/getSizeOderDetail`, 'POST', params)
// 零售详细列表
api.getRetailOrderDetail = params => request.globalRequest(`${PORT1}/MiniProgram/getRetailOrderDetail`, 'POST', params)
// 订单详情
api.getOrderDetail = params => request.globalRequest(`${PORT1}/MiniProgram/getOrderDetail`, 'POST', params)
// 售后概览
api.getSizeOrderRefund = params => request.globalRequest(`${PORT1}/MiniProgram/getSizeOrderRefund`, 'POST', params)
// 售后详情
api.getSizeOrderRefundDetail = params => request.globalRequest(`${PORT1}/MiniProgram/getSizeOrderRefundDetail`, 'POST', params)
// 发货概览
api.getSendOutGoods = params => request.globalRequest(`${PORT1}/MiniProgram/getSendOutGoods`, 'POST', params)
// 发货详情
api.getSendOutGoodsDetail = params => request.globalRequest(`${PORT1}/MiniProgram/getSendOutGoodsDetail`, 'POST', params)
// 财务概览
api.getFinanceInfo = params => request.globalRequest(`${PORT1}/MiniProgram/getFinanceInfo`, 'POST', params)


export default api